jQuery .remove() does not work with div created inside the function